#include <iostream>
#include <memory>
#include <vector>
using namespace std;
class Point
{
public:
    Point(int x, int y)
        : _x(x), _y(y)
    {
    }
    void print()
    {
        cout << _x << "," << _y << endl;
    }

private:
    int _x;
    int _y;
};
void test()
{
    unique_ptr<Point> up(new Point(1, 2));
    unique_ptr<Point> up2(new Point(2, 3));
    unique_ptr<Point> up3(new Point(3, 4));
    unique_ptr<Point> up4(new Point(4, 5));
    unique_ptr<Point> up5(new Point(5, 6));
    vector<unique_ptr<Point>> vec;
    vec.push_back(std::move(up));
    vec.push_back(std::move(up2));
    vec.push_back(std::move(up3));
    vec.push_back(std::move(up4));
    vec.push_back(std::move(up5));
    for(auto & ptr : vec){
        ptr->print();
    }
}
int main()
{
    test();
    return 0;
}
